package com.fufufu.mail.product.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import lombok.Data;

/**
 * sku信息
 * 
 * @author zyx
 * @email 1262074394@qq.com
 * @date 2022-09-15 08:15:48
 */
@Data
@TableName("pms_sku_info")
public class SkuInfoEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * skuId
	 */
	// 表示id是自己输入的不是自增
	@TableId
	private Long skuId;
	/**
	 * spuId
	 */
	private Long spuId;
	/**
	 * sku名称
	 */
	private String skuName;
	/**
	 * sku介绍描述
	 */
	private String skuDesc;
	/**
	 * 所属分类id
	 */
	private Long catalogId;
	/**
	 * 品牌id
	 */
	private Long brandId;
	/**
	 * 默认图片
	 */
	private String skuDefaultImg;
	/**
	 * 标题
	 */
	private String skuTitle;
	/**
	 * 副标题
	 */
	private String skuSubtitle;
	/**
	 * 价格
	 */
	private BigDecimal price;
	/**
	 * 销量
	 */
	private Long saleCount;


	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		SkuInfoEntity that = (SkuInfoEntity) o;
		return Objects.equals(spuId, that.spuId) && Objects.equals(skuName, that.skuName) && Objects.equals(skuDesc, that.skuDesc) && Objects.equals(catalogId, that.catalogId) && Objects.equals(brandId, that.brandId) && Objects.equals(skuDefaultImg, that.skuDefaultImg) && Objects.equals(skuTitle, that.skuTitle) && Objects.equals(skuSubtitle, that.skuSubtitle) && Objects.equals(price, that.price) && Objects.equals(saleCount, that.saleCount);
	}

	@Override
	public int hashCode() {
		return Objects.hash(spuId, skuName, skuDesc, catalogId, brandId, skuDefaultImg, skuTitle, skuSubtitle, price, saleCount);
	}
}
